/*
 * LogFactory.h
 *
 *  Created on: 19.09.2011
 *      Author: sili
 */

#ifndef LOGFACTORY_H_
#define LOGFACTORY_H_

#include "Controller.h"
#include "log4cxx/propertyconfigurator.h"
#include <iostream>
#include <fstream>

class LogFactory : ActionListener{
	private:
		string configDir;
		string propertyFile;
		Controller * controller;
		vector<AALAction *> actions;
	public:
		LogFactory(Controller * _controller, const char * _configDir);
		virtual ~LogFactory();
		static char * logMsg2json(const struct logMessage * _message);
		static char * logMsg2xml(const struct logMessage * _message);
		static void logMsgs2json(long last_id, string * _buffer);

		logMessage * newLogMessage(logMsgStatus _status, const char * _message);
};

#endif /* LOGFACTORY_H_ */
